<!DOCTYPE html>
<html>
<head>
    <title>培训需求管理</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <div class="form-group col-sm-2">
                <input type="text" class="form-control" v-model="q.year" @keyup.enter="query" placeholder="年度">
            </div>
            <div class="form-group col-sm-2">
                <input type="text" class="form-control" v-model="q.demandOrganizationDepartment" @keyup.enter="query"
                       placeholder="需求组织部门">
            </div>
            <div class="col-sm-1 control-label">培训形式</div>
            <div class="col-sm-2">
                <select v-model="q.type" @keyup.enter="query" class="form-control" >
                    <option v-for="type in dictList1" :value="type.value">{{type.label}}</option>
                </select>
            </div>
            <a class="btn btn-default" @click="query">查询</a>
        </div>
            <div class="grid-btn">
        #if($shiro.hasPermission("trainingdemandmanagement:save"))
        <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
        #end
        #if($shiro.hasPermission("trainingdemandmanagement:update"))
        <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
        #end
        #if($shiro.hasPermission("trainingdemandmanagement:delete"))
        <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
        #end
    </div>
    <table id="jqGrid"></table>
    <div id="jqGridPager"></div>
</div>

<div v-show="!showList&&showtable" class="panel panel-default">
    <div class="panel-heading">{{title}}</div>
    <form class="form-horizontal">
        <div class="form-group">
            <div class="col-sm-1 control-label">培训形式</div>
            <div class="col-sm-2">
                <select v-model="trainingDemandManagement.type" @change='typeChange' class="form-control">
                    <option v-for="type in dictList1" :value="type.value">{{type.label}}</option>
                </select>
            </div>


            <div class="col-sm-1 control-label">需求年度</div>
            <div class="col-sm-2">
                <input type="text" class="form-control" v-model="trainingDemandManagement.year" placeholder="需求年度"/>
            </div>


        </div>


        <div class="form-group">
            <div class="col-sm-1 control-label">需求部门</div>
            <div class="col-sm-2">
                <input type="text" class="form-control" v-model="trainingDemandManagement.demandDept"
                       placeholder="需求部门"/>
            </div>
            <div class="col-sm-1 control-label">需求内容</div>
            <div class="col-sm-2">
                <input type="text" class="form-control" v-model="trainingDemandManagement.internalDemandContent"
                       placeholder="内部需求内容"/>
            </div>


        </div>

        <div class="form-group">
            <div class="col-sm-1 control-label">需求时间</div>
            <div class="col-sm-2">

                <input type="text" class="form-control" v-model="trainingDemandManagement.demandTime" placeholder="需求时间"
                       id="demandTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" readonly="readonly" onchange="zfDate(this.value)"
                />
            </div>
            <div class="col-sm-1 control-label">需求人员</div>
            <div class="col-sm-2">
                <input type="text" class="form-control" v-model="trainingDemandManagement.demandPerson"
                       placeholder="需求人员"/>
            </div>

        </div>

        <div class="form-group">
            <div class="col-sm-1 control-label">预计课时</div>
            <div class="col-sm-2">
                <input type="text" class="form-control" v-model="trainingDemandManagement.expectedTime"
                       placeholder="预计课时"/>
            </div>
            <div class="col-sm-1 control-label">需求组织部门</div>
            <div class="col-sm-2">
                <input type="text" class="form-control" v-model="trainingDemandManagement.demandOrganizationDepartment"
                       placeholder="需求组织部门"/>
            </div>


        </div>


        <div class="form-group">
            <div class="col-sm-2 control-label"></div>
            <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
            &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
        </div>
    </form>
</div>

<div v-show="!showList&&!showtable" class="panel panel-default">
    <div class="panel-heading">{{title}}</div>
    <form class="form-horizontal">
        <div class="form-group">
            <div class="col-sm-1 control-label">培训形式</div>
            <div class="col-sm-2">
                <select v-model="trainingDemandManagement.type" @change='typeChange' class="form-control">
                    <option v-for="type in dictList1" :value="type.value">{{type.label}}</option>
                </select>
            </div>


            <div class="col-sm-1 control-label">需求年度</div>
            <div class="col-sm-2">
                <input type="text" class="form-control" v-model="trainingDemandManagement.year" placeholder="需求年度"/>
            </div>


        </div>


        <div class="form-group">
            <div class="col-sm-1 control-label">需求部门</div>
            <div class="col-sm-2">
                <input type="text" class="form-control" v-model="trainingDemandManagement.demandDept"
                       placeholder="需求部门"/>
            </div>
            <div class="col-sm-1 control-label">需求内容</div>
            <div class="col-sm-2">
                <input type="text" class="form-control" v-model="trainingDemandManagement.internalDemandContent"
                       placeholder="内部需求内容"/>
            </div>


        </div>


        <div class="form-group">
            <div class="col-sm-1 control-label">需求人员</div>
            <div class="col-sm-2">
                <input type="text" class="form-control" v-model="trainingDemandManagement.demandPerson"
                       placeholder="需求人员"/>
            </div>
            <div class="col-sm-1 control-label">送培人员</div>
            <div class="col-sm-2">
                <input type="text" class="form-control" v-model="trainingDemandManagement.trainingPerson"
                       placeholder="送培人员"/>
            </div>


        </div>

        <!--<div class="form-group">
<div class="col-sm-1 control-label">岗位id</div>
<div class="col-sm-2">
<input type="text" class="form-control" v-model="trainingDemandManagement.postId" placeholder="岗位id"/>
</div>
</div>-->
        <div class="form-group">
            <div class="col-sm-1 control-label">岗位名称</div>
            <div class="col-sm-2">
                <!--<select v-model="trainingDemandManagement.post" class="form-control">
                    <option v-for="post in dictList" :value="post.value">{{post.label}}</option>
                </select>-->
                <input type="text" class="form-control" v-model="trainingDemandManagement.post" placeholder="岗位名称"/>
            </div>
            <div class="col-sm-1 control-label">预计费用</div>
            <div class="col-sm-2">
                <input type="text" class="form-control" v-model="trainingDemandManagement.estimatedCost"
                       placeholder="预计费用"/>
            </div>


        </div>

        <div class="form-group">
            <div class="col-sm-1 control-label">培训单位</div>
            <div class="col-sm-2">
                <input type="text" class="form-control" v-model="trainingDemandManagement.trainingUnit"
                       placeholder="培训单位"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label"></div>
            <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
            &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
        </div>
    </form>
</div>
</div>

<script src="${rc.contextPath}/js/hr/trainingdemandmanagement.js?_${date.systemTime}"></script>
</body>
</html>